<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="SpriteAsset,mx.core.SpriteAsset,borderMetrics,measuredHeight,measuredWidth,move,setActualSize" name="keywords">
<title>mx.core.SpriteAsset</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'SpriteAsset - Zentrum virtUOS: virtPresenter';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">virtPresenter AsDoc</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?mx/core/SpriteAsset.html&amp;mx/core/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;SpriteAsset</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class SpriteAsset"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mx.core</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class SpriteAsset</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">SpriteAsset <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> <a href="FlexSprite.html">FlexSprite</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> flash.display.Sprite</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="IBorder.html">IBorder</a>, <a href="IFlexAsset.html">IFlexAsset</a>, <a href="IFlexDisplayObject.html">IFlexDisplayObject</a></td>
</tr>
</table>
<p></p>
  SpriteAsset is a subclass of the flash.display.Sprite class which
  represents vector graphic images that you embed in a Flex application.
  It implements the IFlexDisplayObject interface, which makes it
  possible for an embedded vector graphic image to be displayed in an Image
  control, or to be used as a container background or a component skin.
   <p>The vector graphic image that you're embedding can be in an SVG file.
  You can also embed a sprite symbol that is in a SWF file produced
  by Flash.
  In both cases, the MXML compiler autogenerates a class that extends
  SpriteAsset to represent the embedded vector graphic image.</p>
   <p>You don't generally have to use the SpriteAsset class directly
  when you write a Flex application.
  For example, you can embed a sprite symbol from a SWF file and display
  it in an Image control by writing the following:</p>
   <pre>
  &lt;mx:Image id="logo" source="&#64;Embed(source='Assets.swf', symbol='Logo')"/&gt;</pre>
   <p>Or use it as the application's background image in CSS syntax
  by writing the following:</p>
   <pre>
  &lt;mx:Style&gt;
      Application
      {
          backgroundImage: Embed(source="Assets.swf", symbol='Logo')
      }
  &lt;mx:Style/&gt;</pre>
   <p>without having to understand that the MXML compiler has created
  a subclass of BitmapAsset for you.</p>
   <p>However, it may be useful to understand what is happening
  at the ActionScript level.
  To embed a vector graphic image in ActionScript, you declare a variable
  of type Class, and put <code>[Embed]</code> metadata on it.
  For example, you embed a sprite symbol from a SWF file like this:</p>
   <pre>
  [Bindable]
  [Embed(source="Assets.swf", symbol="Logo")]
  private var logoClass:Class;</pre>
   <p>The MXML compiler notices that the Logo symbol in Assets.swf
  is a sprite, autogenerates a subclass of the SpriteAsset class
  to represent it, and sets your variable to be a reference to this
  autogenerated class.
  You can then use this class reference to create instances of the
  SpriteAsset using the <code>new</code> operator, and use APIs
  of the Sprite class on them:</p>
   <pre>
  var logo:SpriteAsset = SpriteAsset(new logoClass());
  logo.rotation=45;</pre>
   <p>However, you rarely need to create SpriteAsset instances yourself
  because image-related properties and styles can simply be set to an
  image-producing class, and components will create image instances
  as necessary.
  For example, to display this vector graphic image in an Image control,
  you can set the Image's <code>source</code> property to
  <code>logoClass</code>.
  In MXML you could do this as follows:</p>
   <pre>
  &lt;mx:Image id="logo" source="{logoClass}"/&gt;</pre>
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#borderMetrics">borderMetrics</a> : <a href="../core/EdgeMetrics.html">EdgeMetrics</a>
<div class="summaryTableDescription">[read-only]
      
      Returns an EdgeMetrics object for the border that has four properties:
      <code>left</code>, <code>top</code>, <code>right</code>,
      and <code>bottom</code>.</div>
</td><td class="summaryTableOwnerCol">SpriteAsset</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#measuredHeight">measuredHeight</a> : Number<div class="summaryTableDescription">[read-only]
      
   The measured height of this object.</div>
</td><td class="summaryTableOwnerCol">SpriteAsset</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#measuredWidth">measuredWidth</a> : Number<div class="summaryTableDescription">[read-only]
      
   The measured width of this object.</div>
</td><td class="summaryTableOwnerCol">SpriteAsset</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#SpriteAsset()">SpriteAsset</a>()</div>
<div class="summaryTableDescription">
      Constructor.</div>
</td><td class="summaryTableOwnerCol">SpriteAsset</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#move()">move</a>(x:Number, y:Number):void</div>
<div class="summaryTableDescription">
      
   Moves this object to the specified x and y coordinates.</div>
</td><td class="summaryTableOwnerCol">SpriteAsset</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setActualSize()">setActualSize</a>(newWidth:Number, newHeight:Number):void</div>
<div class="summaryTableDescription">
      
   Sets the actual size of this object.</div>
</td><td class="summaryTableOwnerCol">SpriteAsset</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="FlexSprite.html#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
   Returns a string indicating the location of this object
   within the hierarchy of DisplayObjects in the Application.</div>
</td><td class="summaryTableOwnerCol"><a href="FlexSprite.html">FlexSprite</a></td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="borderMetrics"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">borderMetrics</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>borderMetrics:<a href="../core/EdgeMetrics.html">EdgeMetrics</a></code>&nbsp;&nbsp;[read-only]<p>
      
      Returns an EdgeMetrics object for the border that has four properties:
      <code>left</code>, <code>top</code>, <code>right</code>,
      and <code>bottom</code>.
      The value of each property is equal to the thickness of one side
      of the border, in pixels.
     </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get borderMetrics():<a href="../core/EdgeMetrics.html">EdgeMetrics</a></code>
<br>
</div>
<a name="measuredHeight"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">measuredHeight</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>measuredHeight:Number</code>&nbsp;&nbsp;[read-only]<p>
      
   The measured height of this object.
     </p><p>This is typically hard-coded for graphical skins
   because this number is simply the number of pixels in the graphic.
   For code skins, it can also be hard-coded
   if you expect to be drawn at a certain size.
   If your size can change based on properties, you may want
   to also be an ILayoutManagerClient so a <code>measure()</code>
   method will be called at an appropriate time,
   giving you an opportunity to compute a <code>measuredHeight</code>.</p>
  <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get measuredHeight():Number</code>
<br>
</div>
<a name="measuredWidth"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">measuredWidth</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>measuredWidth:Number</code>&nbsp;&nbsp;[read-only]<p>
      
   The measured width of this object.
     </p><p>This is typically hard-coded for graphical skins
   because this number is simply the number of pixels in the graphic.
   For code skins, it can also be hard-coded
   if you expect to be drawn at a certain size.
   If your size can change based on properties, you may want
   to also be an ILayoutManagerClient so a <code>measure()</code>
   method will be called at an appropriate time,
   giving you an opportunity to compute a <code>measuredHeight</code>.</p>
  <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get measuredWidth():Number</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="SpriteAsset()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">SpriteAsset</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function SpriteAsset()</code><p>
      Constructor.
     </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="move()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">move</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function move(x:Number, y:Number):void</code><p>
      
   Moves this object to the specified x and y coordinates.
  
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">x</span>:Number</code> &mdash; The new x-position for this object.
  
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">y</span>:Number</code> &mdash; The new y-position for this object.
  </td>
</tr>
</table>
</div>
<a name="setActualSize()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setActualSize</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setActualSize(newWidth:Number, newHeight:Number):void</code><p>
      
   Sets the actual size of this object.
     </p><p>This method is mainly for use in implementing the
   <code>updateDisplayList()</code> method, which is where
   you compute this object's actual size based on
   its explicit size, parent-relative (percent) size,
   and measured size.
   You then apply this actual size to the object
   by calling <code>setActualSize()</code>.</p>
     <p>In other situations, you should be setting properties
   such as <code>width</code>, <code>height</code>,
   <code>percentWidth</code>, or <code>percentHeight</code>
   rather than calling this method.</p>
  
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">newWidth</span>:Number</code> &mdash; The new width for this object.
  
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">newHeight</span>:Number</code> &mdash; The new height for this object.
  </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
